package com.bdmc.base.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.annotation.ExcelDictFormat;
import com.bdmc.common.convert.ExcelDictConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * 车辆信息视图对象 base_car
 *
 * @author bdmc
 * @date 2022-03-03
 */
@Data
@ExcelIgnoreUnannotated
public class BaseCarVo {

	private static final long serialVersionUID = 1L;

    /**
     * 车辆id
     */
	@ExcelProperty(value = "车辆id")
	private Long carId;

    /**
     * 部门id
     */
	@ExcelProperty(value = "部门id")
	private Long deptId;

    /**
     * 设备id
     */
	@ExcelProperty(value = "设备id")
	private Long deviceId;

    /**
     * 油量设备id
     */
	@ExcelProperty(value = "油量设备id")
	private Long oilDeviceId;

    /**
     * 车牌号
     */
	@ExcelProperty(value = "车牌号")
	private String carNum;

    /**
     * 车辆类型
     */
    @ExcelProperty(value = "车辆类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "base_car_type")
	private String carType;

    /**
     * 车辆所属权
     */
	@ExcelProperty(value = "车辆所属权")
	private String carAttribution;

    /**
     * 发动机号
     */
	@ExcelProperty(value = "发动机号")
	private String engineNum;

    /**
     * 车架号
     */
	@ExcelProperty(value = "车架号")
	private String frameNum;

    /**
     * 照片路径
     */
	@ExcelProperty(value = "照片路径")
	private String photoPath;

    /**
     * 备注
     */
	@ExcelProperty(value = "备注")
	private String remark;

    /**
     * 购入日期
     */
	@ExcelProperty(value = "购入日期")
	private Date buyDate;

    /**
     * 里程数
     */
	@ExcelProperty(value = "里程数")
	private Integer mileage;

	@ExcelProperty(value = "部门名称")
	private String deptName;

	/**
	 * 绑定设备imei
	 */
	@ExcelProperty(value = "gps设备imei")
	private String imei;
	/**
	 * 绑定油量设备imei
	 */
	@ExcelProperty(value = "油量设备imei")
	private String oilImei;

	//808终端手机号
	private String devicePhoneNum;

	private Integer onlineStatus;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime dataTime;
}
